<?php
/**
 * Class descript.
 * User: chan
 * Date: 2017/10/26 15:29
 */
namespace app\api\controller;
use think\Db;
use app\api\model\Picture;
use app\api\model\Typeface;

class Play extends Base
{
    /**
     * 获取轮播图
     */
    public function getPicture()
    {
        $input = input();
        if (empty($input['type'])){
            return $this->ajaxReturn('',-1,'未定义type');
        }

        $picture = new Picture();
        $data = $picture->getAll(['type'=>$input['type']]);
        return $this->ajaxReturn($data);
    }

    /**
     * 获取轮播文字
     */
    public function getTypeface()
    {
        $input = input();
        if (empty($input['type'])){
            return $this->ajaxReturn('',-1,'未定义type');
        }
        $picture = new Typeface();
        $data = $picture->getAll(['type'=>$input['type']]);
        return $this->ajaxReturn($data);
    }
}